package com.magesti.ressource;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import com.magesti.DAO.DaoFactory;

public class Initialisation implements ServletContextListener{
	
	private DaoFactory daoFactory;
	
	@Override
	public void contextInitialized( ServletContextEvent event){
		ServletContext servletContext = event.getServletContext();
		this.daoFactory = DaoFactory.getInstance();
		servletContext.setAttribute(Global.ATT_CONTEXT_DAO_FACTORY, this.daoFactory);
		
		Generated.checkXmlIntegrity();
	}

	@Override
	public void contextDestroyed(ServletContextEvent arg0) {
		// TODO Auto-generated method stub
		
	}
	

}
